<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title><h:outputText value="#{bundle.Title1}"/></title>
    </h:head>
    <h:body>
        
        <h:form>            
            <h2>
                <h:outputText value="#{bundle.Greetings}"/>
            </h2>
            <p>
                <h:outputText value="#{bundle.LogPrompt}"/>
            </p>
            <h:messages styleClass="errorMsg" > </h:messages>
            <h:panelGrid columns="2" columnClasses="rightAlign, leftAlign">
                <h:outputText value="#{bundle.Login}"/>
                <h:inputText id="login"
                             label="#{bundle.Login}"
                             value="#{LoginManager.login}"                             
                             validator="#{LoginManager.validateLogin}">

                </h:inputText>
                <h:outputText value="#{bundle.Pass}"/>
                <h:inputSecret id="pass"
                               label="#{bundle.Pass}"
                               value="#{LoginManager.pass}"
                               validator="#{LoginManager.validatePass}">
                </h:inputSecret>
                <h:panelGroup> </h:panelGroup>
                <h:commandButton value="#{bundle.Submit}" action="#{LoginManager.logIn}"/>
            </h:panelGrid>



        </h:form>
        <h:form>
            <h:commandButton value="EN" actionListener="#{localeBean.chooseLocaleFromLink}"/>
            <h:commandButton value="PL" actionListener="#{localeBean.chooseLocaleFromLink}"/>
        </h:form>
        <h3>Language switcher:</h3>
        <h:form id="langauge_form">
            <h:commandLink action="#{languageSwitcher.changeLanguage('pl')}" value="Polski" /> |
            <h:commandLink action="#{languageSwitcher.changeLanguage('en')}" value="English" />
        </h:form>
    </h:body>
</html>